/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package j2ee.impl;

import j2ee.CmpFieldType;
import j2ee.EjbLocalRefType;
import j2ee.EntityType;
import j2ee.J2eePackage;
import j2ee.QueryType;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Entity Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getEjbLocalRef <em>Ejb Local Ref</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getCmpField <em>Cmp Field</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getPrimkeyField <em>Primkey Field</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getEjbClass <em>Ejb Class</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getReentrant <em>Reentrant</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getEjbName <em>Ejb Name</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getQuery <em>Query</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getLocal <em>Local</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getAbstractSchemaName <em>Abstract Schema Name</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getPrimKeyClass <em>Prim Key Class</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getPersistenceType <em>Persistence Type</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getLocalHome <em>Local Home</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getCmpVersion <em>Cmp Version</em>}</li>
 *   <li>{@link j2ee.impl.EntityTypeImpl#getId <em>Id</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class EntityTypeImpl extends EObjectImpl implements EntityType {
	/**
	 * The cached value of the '{@link #getEjbLocalRef() <em>Ejb Local Ref</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEjbLocalRef()
	 * @generated
	 * @ordered
	 */
	protected EjbLocalRefType ejbLocalRef;

	/**
	 * The cached value of the '{@link #getCmpField() <em>Cmp Field</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCmpField()
	 * @generated
	 * @ordered
	 */
	protected EList<CmpFieldType> cmpField;

	/**
	 * The default value of the '{@link #getPrimkeyField() <em>Primkey Field</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPrimkeyField()
	 * @generated
	 * @ordered
	 */
	protected static final String PRIMKEY_FIELD_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPrimkeyField() <em>Primkey Field</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPrimkeyField()
	 * @generated
	 * @ordered
	 */
	protected String primkeyField = PRIMKEY_FIELD_EDEFAULT;

	/**
	 * The default value of the '{@link #getEjbClass() <em>Ejb Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEjbClass()
	 * @generated
	 * @ordered
	 */
	protected static final String EJB_CLASS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getEjbClass() <em>Ejb Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEjbClass()
	 * @generated
	 * @ordered
	 */
	protected String ejbClass = EJB_CLASS_EDEFAULT;

	/**
	 * The default value of the '{@link #getReentrant() <em>Reentrant</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getReentrant()
	 * @generated
	 * @ordered
	 */
	protected static final String REENTRANT_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getReentrant() <em>Reentrant</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getReentrant()
	 * @generated
	 * @ordered
	 */
	protected String reentrant = REENTRANT_EDEFAULT;

	/**
	 * The default value of the '{@link #getEjbName() <em>Ejb Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEjbName()
	 * @generated
	 * @ordered
	 */
	protected static final String EJB_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getEjbName() <em>Ejb Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEjbName()
	 * @generated
	 * @ordered
	 */
	protected String ejbName = EJB_NAME_EDEFAULT;

	/**
	 * The cached value of the '{@link #getQuery() <em>Query</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getQuery()
	 * @generated
	 * @ordered
	 */
	protected QueryType query;

	/**
	 * The default value of the '{@link #getLocal() <em>Local</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocal()
	 * @generated
	 * @ordered
	 */
	protected static final String LOCAL_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLocal() <em>Local</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocal()
	 * @generated
	 * @ordered
	 */
	protected String local = LOCAL_EDEFAULT;

	/**
	 * The default value of the '{@link #getAbstractSchemaName() <em>Abstract Schema Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAbstractSchemaName()
	 * @generated
	 * @ordered
	 */
	protected static final String ABSTRACT_SCHEMA_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getAbstractSchemaName() <em>Abstract Schema Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAbstractSchemaName()
	 * @generated
	 * @ordered
	 */
	protected String abstractSchemaName = ABSTRACT_SCHEMA_NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getPrimKeyClass() <em>Prim Key Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPrimKeyClass()
	 * @generated
	 * @ordered
	 */
	protected static final String PRIM_KEY_CLASS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPrimKeyClass() <em>Prim Key Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPrimKeyClass()
	 * @generated
	 * @ordered
	 */
	protected String primKeyClass = PRIM_KEY_CLASS_EDEFAULT;

	/**
	 * The default value of the '{@link #getPersistenceType() <em>Persistence Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPersistenceType()
	 * @generated
	 * @ordered
	 */
	protected static final String PERSISTENCE_TYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getPersistenceType() <em>Persistence Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPersistenceType()
	 * @generated
	 * @ordered
	 */
	protected String persistenceType = PERSISTENCE_TYPE_EDEFAULT;

	/**
	 * The default value of the '{@link #getLocalHome() <em>Local Home</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocalHome()
	 * @generated
	 * @ordered
	 */
	protected static final String LOCAL_HOME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getLocalHome() <em>Local Home</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getLocalHome()
	 * @generated
	 * @ordered
	 */
	protected String localHome = LOCAL_HOME_EDEFAULT;

	/**
	 * The default value of the '{@link #getCmpVersion() <em>Cmp Version</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCmpVersion()
	 * @generated
	 * @ordered
	 */
	protected static final String CMP_VERSION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCmpVersion() <em>Cmp Version</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCmpVersion()
	 * @generated
	 * @ordered
	 */
	protected String cmpVersion = CMP_VERSION_EDEFAULT;

	/**
	 * The default value of the '{@link #getId() <em>Id</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getId()
	 * @generated
	 * @ordered
	 */
	protected static final Object ID_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getId()
	 * @generated
	 * @ordered
	 */
	protected Object id = ID_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EntityTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return J2eePackage.Literals.ENTITY_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EjbLocalRefType getEjbLocalRef() {
		return ejbLocalRef;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetEjbLocalRef(EjbLocalRefType newEjbLocalRef, NotificationChain msgs) {
		EjbLocalRefType oldEjbLocalRef = ejbLocalRef;
		ejbLocalRef = newEjbLocalRef;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF, oldEjbLocalRef, newEjbLocalRef);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEjbLocalRef(EjbLocalRefType newEjbLocalRef) {
		if (newEjbLocalRef != ejbLocalRef) {
			NotificationChain msgs = null;
			if (ejbLocalRef != null)
				msgs = ((InternalEObject)ejbLocalRef).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF, null, msgs);
			if (newEjbLocalRef != null)
				msgs = ((InternalEObject)newEjbLocalRef).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF, null, msgs);
			msgs = basicSetEjbLocalRef(newEjbLocalRef, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF, newEjbLocalRef, newEjbLocalRef));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<CmpFieldType> getCmpField() {
		if (cmpField == null) {
			cmpField = new EObjectContainmentEList<CmpFieldType>(CmpFieldType.class, this, J2eePackage.ENTITY_TYPE__CMP_FIELD);
		}
		return cmpField;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPrimkeyField() {
		return primkeyField;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPrimkeyField(String newPrimkeyField) {
		String oldPrimkeyField = primkeyField;
		primkeyField = newPrimkeyField;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__PRIMKEY_FIELD, oldPrimkeyField, primkeyField));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getEjbClass() {
		return ejbClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEjbClass(String newEjbClass) {
		String oldEjbClass = ejbClass;
		ejbClass = newEjbClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__EJB_CLASS, oldEjbClass, ejbClass));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getReentrant() {
		return reentrant;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setReentrant(String newReentrant) {
		String oldReentrant = reentrant;
		reentrant = newReentrant;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__REENTRANT, oldReentrant, reentrant));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getEjbName() {
		return ejbName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEjbName(String newEjbName) {
		String oldEjbName = ejbName;
		ejbName = newEjbName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__EJB_NAME, oldEjbName, ejbName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public QueryType getQuery() {
		return query;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetQuery(QueryType newQuery, NotificationChain msgs) {
		QueryType oldQuery = query;
		query = newQuery;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__QUERY, oldQuery, newQuery);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setQuery(QueryType newQuery) {
		if (newQuery != query) {
			NotificationChain msgs = null;
			if (query != null)
				msgs = ((InternalEObject)query).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - J2eePackage.ENTITY_TYPE__QUERY, null, msgs);
			if (newQuery != null)
				msgs = ((InternalEObject)newQuery).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - J2eePackage.ENTITY_TYPE__QUERY, null, msgs);
			msgs = basicSetQuery(newQuery, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__QUERY, newQuery, newQuery));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLocal() {
		return local;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLocal(String newLocal) {
		String oldLocal = local;
		local = newLocal;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__LOCAL, oldLocal, local));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getAbstractSchemaName() {
		return abstractSchemaName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAbstractSchemaName(String newAbstractSchemaName) {
		String oldAbstractSchemaName = abstractSchemaName;
		abstractSchemaName = newAbstractSchemaName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__ABSTRACT_SCHEMA_NAME, oldAbstractSchemaName, abstractSchemaName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPrimKeyClass() {
		return primKeyClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPrimKeyClass(String newPrimKeyClass) {
		String oldPrimKeyClass = primKeyClass;
		primKeyClass = newPrimKeyClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__PRIM_KEY_CLASS, oldPrimKeyClass, primKeyClass));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getPersistenceType() {
		return persistenceType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPersistenceType(String newPersistenceType) {
		String oldPersistenceType = persistenceType;
		persistenceType = newPersistenceType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__PERSISTENCE_TYPE, oldPersistenceType, persistenceType));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLocalHome() {
		return localHome;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setLocalHome(String newLocalHome) {
		String oldLocalHome = localHome;
		localHome = newLocalHome;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__LOCAL_HOME, oldLocalHome, localHome));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCmpVersion() {
		return cmpVersion;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCmpVersion(String newCmpVersion) {
		String oldCmpVersion = cmpVersion;
		cmpVersion = newCmpVersion;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__CMP_VERSION, oldCmpVersion, cmpVersion));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object getId() {
		return id;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setId(Object newId) {
		Object oldId = id;
		id = newId;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.ENTITY_TYPE__ID, oldId, id));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF:
				return basicSetEjbLocalRef(null, msgs);
			case J2eePackage.ENTITY_TYPE__CMP_FIELD:
				return ((InternalEList<?>)getCmpField()).basicRemove(otherEnd, msgs);
			case J2eePackage.ENTITY_TYPE__QUERY:
				return basicSetQuery(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF:
				return getEjbLocalRef();
			case J2eePackage.ENTITY_TYPE__CMP_FIELD:
				return getCmpField();
			case J2eePackage.ENTITY_TYPE__PRIMKEY_FIELD:
				return getPrimkeyField();
			case J2eePackage.ENTITY_TYPE__EJB_CLASS:
				return getEjbClass();
			case J2eePackage.ENTITY_TYPE__REENTRANT:
				return getReentrant();
			case J2eePackage.ENTITY_TYPE__EJB_NAME:
				return getEjbName();
			case J2eePackage.ENTITY_TYPE__QUERY:
				return getQuery();
			case J2eePackage.ENTITY_TYPE__LOCAL:
				return getLocal();
			case J2eePackage.ENTITY_TYPE__ABSTRACT_SCHEMA_NAME:
				return getAbstractSchemaName();
			case J2eePackage.ENTITY_TYPE__PRIM_KEY_CLASS:
				return getPrimKeyClass();
			case J2eePackage.ENTITY_TYPE__PERSISTENCE_TYPE:
				return getPersistenceType();
			case J2eePackage.ENTITY_TYPE__LOCAL_HOME:
				return getLocalHome();
			case J2eePackage.ENTITY_TYPE__CMP_VERSION:
				return getCmpVersion();
			case J2eePackage.ENTITY_TYPE__ID:
				return getId();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF:
				setEjbLocalRef((EjbLocalRefType)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__CMP_FIELD:
				getCmpField().clear();
				getCmpField().addAll((Collection<? extends CmpFieldType>)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__PRIMKEY_FIELD:
				setPrimkeyField((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__EJB_CLASS:
				setEjbClass((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__REENTRANT:
				setReentrant((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__EJB_NAME:
				setEjbName((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__QUERY:
				setQuery((QueryType)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__LOCAL:
				setLocal((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__ABSTRACT_SCHEMA_NAME:
				setAbstractSchemaName((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__PRIM_KEY_CLASS:
				setPrimKeyClass((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__PERSISTENCE_TYPE:
				setPersistenceType((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__LOCAL_HOME:
				setLocalHome((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__CMP_VERSION:
				setCmpVersion((String)newValue);
				return;
			case J2eePackage.ENTITY_TYPE__ID:
				setId(newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF:
				setEjbLocalRef((EjbLocalRefType)null);
				return;
			case J2eePackage.ENTITY_TYPE__CMP_FIELD:
				getCmpField().clear();
				return;
			case J2eePackage.ENTITY_TYPE__PRIMKEY_FIELD:
				setPrimkeyField(PRIMKEY_FIELD_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__EJB_CLASS:
				setEjbClass(EJB_CLASS_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__REENTRANT:
				setReentrant(REENTRANT_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__EJB_NAME:
				setEjbName(EJB_NAME_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__QUERY:
				setQuery((QueryType)null);
				return;
			case J2eePackage.ENTITY_TYPE__LOCAL:
				setLocal(LOCAL_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__ABSTRACT_SCHEMA_NAME:
				setAbstractSchemaName(ABSTRACT_SCHEMA_NAME_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__PRIM_KEY_CLASS:
				setPrimKeyClass(PRIM_KEY_CLASS_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__PERSISTENCE_TYPE:
				setPersistenceType(PERSISTENCE_TYPE_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__LOCAL_HOME:
				setLocalHome(LOCAL_HOME_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__CMP_VERSION:
				setCmpVersion(CMP_VERSION_EDEFAULT);
				return;
			case J2eePackage.ENTITY_TYPE__ID:
				setId(ID_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case J2eePackage.ENTITY_TYPE__EJB_LOCAL_REF:
				return ejbLocalRef != null;
			case J2eePackage.ENTITY_TYPE__CMP_FIELD:
				return cmpField != null && !cmpField.isEmpty();
			case J2eePackage.ENTITY_TYPE__PRIMKEY_FIELD:
				return PRIMKEY_FIELD_EDEFAULT == null ? primkeyField != null : !PRIMKEY_FIELD_EDEFAULT.equals(primkeyField);
			case J2eePackage.ENTITY_TYPE__EJB_CLASS:
				return EJB_CLASS_EDEFAULT == null ? ejbClass != null : !EJB_CLASS_EDEFAULT.equals(ejbClass);
			case J2eePackage.ENTITY_TYPE__REENTRANT:
				return REENTRANT_EDEFAULT == null ? reentrant != null : !REENTRANT_EDEFAULT.equals(reentrant);
			case J2eePackage.ENTITY_TYPE__EJB_NAME:
				return EJB_NAME_EDEFAULT == null ? ejbName != null : !EJB_NAME_EDEFAULT.equals(ejbName);
			case J2eePackage.ENTITY_TYPE__QUERY:
				return query != null;
			case J2eePackage.ENTITY_TYPE__LOCAL:
				return LOCAL_EDEFAULT == null ? local != null : !LOCAL_EDEFAULT.equals(local);
			case J2eePackage.ENTITY_TYPE__ABSTRACT_SCHEMA_NAME:
				return ABSTRACT_SCHEMA_NAME_EDEFAULT == null ? abstractSchemaName != null : !ABSTRACT_SCHEMA_NAME_EDEFAULT.equals(abstractSchemaName);
			case J2eePackage.ENTITY_TYPE__PRIM_KEY_CLASS:
				return PRIM_KEY_CLASS_EDEFAULT == null ? primKeyClass != null : !PRIM_KEY_CLASS_EDEFAULT.equals(primKeyClass);
			case J2eePackage.ENTITY_TYPE__PERSISTENCE_TYPE:
				return PERSISTENCE_TYPE_EDEFAULT == null ? persistenceType != null : !PERSISTENCE_TYPE_EDEFAULT.equals(persistenceType);
			case J2eePackage.ENTITY_TYPE__LOCAL_HOME:
				return LOCAL_HOME_EDEFAULT == null ? localHome != null : !LOCAL_HOME_EDEFAULT.equals(localHome);
			case J2eePackage.ENTITY_TYPE__CMP_VERSION:
				return CMP_VERSION_EDEFAULT == null ? cmpVersion != null : !CMP_VERSION_EDEFAULT.equals(cmpVersion);
			case J2eePackage.ENTITY_TYPE__ID:
				return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (primkeyField: ");
		result.append(primkeyField);
		result.append(", ejbClass: ");
		result.append(ejbClass);
		result.append(", reentrant: ");
		result.append(reentrant);
		result.append(", ejbName: ");
		result.append(ejbName);
		result.append(", local: ");
		result.append(local);
		result.append(", abstractSchemaName: ");
		result.append(abstractSchemaName);
		result.append(", primKeyClass: ");
		result.append(primKeyClass);
		result.append(", persistenceType: ");
		result.append(persistenceType);
		result.append(", localHome: ");
		result.append(localHome);
		result.append(", cmpVersion: ");
		result.append(cmpVersion);
		result.append(", id: ");
		result.append(id);
		result.append(')');
		return result.toString();
	}

} //EntityTypeImpl
